package org.wlw.rpg;

public class ArrowMan extends Player{
    public ArrowMan(String name) {
        super(name);
        this.maxLife = 80;
        this.life = this.maxLife;
        this.attack = 35;
        this.defense = 7;
        this.agile = 25;
        this.critRate = 15;
        this.critDamage = 200;
        Tools.godSay("勇敢的弓箭手["+name+"]在乱世中诞生了!");
        Tools.playerSay(name+":惩恶扬善!");
    }

    @Override
    public void fightWay(Enemy e) {
        Tools.godSay(this.name+"举起了弓箭，射向"+e.name+"！嗖嗖嗖嗖!");
        Tools.playerSay(this.name+":哇哇哇!看我的连珠箭!");
    }

    @Override
    public void checkUpgrade() {
        if(exp>=Tools.getUpgradeExp(level)) {
            Tools.playerSay(this.name+":哈哈哈哈！黑暗精灵给予我力量!我升级啦!");
            this.maxLife+=15;
            this.life = this.maxLife;
            this.attack+=6;
            this.defense+=2;
            this.agile+=2;//敏捷增加2
            this.critRate+=5;
            this.critDamage+=100;
            this.level+=1;
            this.show();
        }
    }
}
